package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"merchant/api/internal/config"
	"merchant/merchantmanagerrpc/merchantmanagerrpcclient"
)

type ServiceContext struct {
	Config             config.Config
	MerchantmanagerRpc merchantmanagerrpcclient.Merchantmanagerrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:             c,
		MerchantmanagerRpc: merchantmanagerrpcclient.NewMerchantmanagerrpc(zrpc.MustNewClient(c.MerchantmanagerRpc)),
	}
}
